<template>
	<view>
		<view class="clin-search">
			<u-search shape="square" :show-action="false"></u-search>
		</view>
		<uni-swipe-action class="clin-sheChat-list">
			<uni-swipe-action-item class="item">				
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
			<uni-swipe-action-item class="item">
				<view class="pic">
					<image src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>					
				</view>
				<view class="txt">
					<view class="txt-1">
						海南人工网
					</view>
					<view class="txt-2">
						[小程序]乐程100
					</view>
				</view>
				<view class="date">2021-11-23</view>
				<u-badge :value="155" numberType="overflow" max="99" :absolute="true" :offset="[10,350]"></u-badge>
				<template v-slot:right>
					<view class="delete">删除</view>
				</template>
			</uni-swipe-action-item>
		</uni-swipe-action>		
		<u-tabbar
			:value="value1"
			@change="change1"
			:fixed="true"
			:placeholder="false"
			:safeAreaInsetBottom="false"
		>
			<u-tabbar-item text="首页" icon="home" ></u-tabbar-item>
			<u-tabbar-item text="联系人" icon="list" ></u-tabbar-item>
			<u-tabbar-item text="薇聊" icon="more-circle"  badge="9"></u-tabbar-item>
			<u-tabbar-item text="我" icon="account" dot ></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value1: 2,
				options:[
					{
						text: '取消',
						style: {
							backgroundColor: '#007aff'
						}
					}, {
						text: '删除',
						style: {
							backgroundColor: '#dd524d'
						}
					}
				  ]
			}
		},
		methods: {
			change1(tab_num) {
				// if (tab_num === 1 || tab_num === 2) return uni.$u.toast('请您先登录')
				// else this.value1 = tab_num
				console.log(tab_num);
				if(tab_num === 0){
					uni.redirectTo({
					    url: '/pages/index/index'
					});
				}
				if(tab_num === 1){
					uni.redirectTo({
					    url: '/pages/contact/contact'
					});
				}
				if(tab_num === 2){
					uni.redirectTo({
					    url: '/pages/sheChat/sheChat'
					});
				}
				if(tab_num === 3){
					uni.redirectTo({
					    url: '/pages/user/user'
					});
				}
				this.value1 = tab_num
			},
			onClick(e){
			  console.log('点击了'+(e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮')
			},
			swipeChange(e,index){
			  console.log('当前状态：'+ e +'，下标：' + index)
			}
		}
	}
</script>

<style>
	@import url("../../static/css.css");
</style>
